package com.gezhi.stuserver.configure;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

@Data
@Component
@ConfigurationProperties(prefix="com.alibaba.datasource")
@PropertySource(value= {"classpath:druid.properties"})
public class Druid {

    /**
     * 数据库的连接地址
     */
    private String url;
    /**
     * 数据库的登录名
     */
    private String userName;
    /**
     * 数据库的登录密码
     */
    private String password;
    private int initialSize;
    private int minIdle;
    private int maxActive;
    private long maxWait;
    private long timeBetweenEvictionRunsMillis;
    private long minEvictableIdleTimeMillis;
    private String validationQuery;
    private boolean testWhileIdle;
    private boolean testOnBorrow;
    private boolean testOnReturn;
    private String filters;
    private String logSlowSql;
    /**
     * 监控程序的登录名
     */
    private String loginUsername;
    /**
     * 监控程序的登录密码
     */
    private String loginPassword;
}
